function init (mainFormId)
{
    var objForm = document.getElementById(mainFormId);
    objForm.onsubmit = validateForm;
}
function validateForm()
{
    var finalValidationResult = true;
    var validationResult = true;
    validationResult = validateMissingText("planName", "lblErrSvcPlanName");
    if(!validationResult) finalValidationResult = false;
    validationResult = validateMissingText("mthFee", "lblErrMthFee");
    if(!validationResult) finalValidationResult = false;
    validationResult = validateMissingText("comm1", "lblErrComm1");
    if(!validationResult) finalValidationResult = false;
     validationResult = validateMissingText("comm2", "lblErrComm2");
    if(!validationResult) finalValidationResult = false;
    validationResult = validateMissingText("init_Fee", "lblErrInitFee");
    if(!validationResult) finalValidationResult = false;
    validationResult = validateMissingText("perUnitFee", "lblErrPerUnitFee");
    if(!validationResult) finalValidationResult = false;
    
    if(!finalValidationResult)
    {
        alert("Validation Error");
        return false;
    }
    else
    {
        return true;
    }
}